﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersonListManager
{
    class Person
    {
        public Person(string firstName, string lastName)
        {
            this.firstName = firstName;
            this.lastName = lastName;
        }

        public Person(string firstName, string lastName, DateTime birthDate)
            : this(firstName, lastName)
        {
            this.birthDate = birthDate;
        }

        public Person(string fullName)
        {

        }

        private DateTime birthDate;
        private string firstName;
        private string lastName;

        public string FirstName
        {
            get
            {
                return this.firstName;
            }

            set
            {
                this.firstName = value;
            }
        }



        public uint Age
        {
            get
            {
                int age = DateTime.Now.Year - this.birthDate.Year;
                return (uint)age;
            }
        }
        public string FullName
        {
            get
            {
                return String.Format("{0} {1}", this.firstName, this.lastName);
            }
        }

        public override string ToString()
        {
            return this.FullName;
        }
    }
}
